Skip to content

[device_info_plus] Add regression integration tests#1038

Merged
seungsoo47 merged 2 commits into
flutter-tizen:masterfrom
seungsoo47:device_info_plus-add-integration-tests
Jun 18, 2026
Merged

[device_info_plus] Add regression integration tests#1038
seungsoo47 merged 2 commits into
flutter-tizen:masterfrom
seungsoo47:device_info_plus-add-integration-tests

Conversation

@seungsoo47

@seungsoo47 seungsoo47 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

device_info_plus_tizen is a standalone Tizen plugin with its own public API (DeviceInfoPluginTizen / TizenDeviceInfo) and does not pin a specific upstream device_info_plus version. For reference, when the current plugin (1.4.0) was implemented the contemporaneous upstream was device_info_plus v12.4.0 (v13.0.0 landed a couple of days later) — its data getter / deprecated toMap API pattern is what the plugin mirrors.

The existing tests already assert every TizenDeviceInfo field; this adds regression tests for the parts of the public API not yet covered:

  • tizenInfo is consistent across repeated calls (cached/idempotent)
  • TizenDeviceInfo.fromMap round-trips through the data map

Validated on a Tizen TV (10.0) and Raspberry Pi 4: all tests pass (4 passed, 0 skipped, 0 failed).

#1039

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds two integration tests to verify that tizenInfo is consistent across repeated calls and that TizenDeviceInfo.fromMap correctly round-trips through data. Feedback on the integration tests suggests improving the consistency test; because tizenInfo caches results internally, comparing calls on the same instance only compares the object with itself. The reviewer recommends asserting identity using same() and instantiating a second plugin instance to properly verify consistent data across separate native channel calls.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

device_info_plus_tizen is a standalone Tizen plugin with its own public API
(DeviceInfoPluginTizen / TizenDeviceInfo) and does not pin a specific upstream
device_info_plus version. For reference, when the current plugin (1.4.0) was
implemented the contemporaneous upstream was device_info_plus v12.4.0
(v13.0.0 landed a couple of days later) — its data getter / deprecated toMap
API pattern is what the plugin mirrors.

The existing tests already assert every TizenDeviceInfo field; this adds
regression tests for the parts of the public API not yet covered:

- tizenInfo is consistent across repeated calls (cached/idempotent)
- TizenDeviceInfo.fromMap round-trips through the data map

Validated on a Tizen TV (10.0) and Raspberry Pi 4: all tests pass
(4 passed, 0 skipped, 0 failed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@seungsoo47
seungsoo47 force-pushed the device_info_plus-add-integration-tests branch from bfb3879 to 0759459 Compare June 17, 2026 11:17
Remove the full data map comparison between two plugin instances.
availableRamSize and freeDiskSize are volatile values that change
between native calls, causing the equals() assertion to fail in CI.
Checking modelName alone is sufficient to verify that a new instance
returns consistent static device data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@seungsoo47
seungsoo47 merged commit da224f3 into flutter-tizen:master Jun 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants